/*
 * report_creator.h
 *
 *  Created on: 28.07.2013
 *      Author: SpirTanol
 */

#ifndef REPORT_CREATOR_H_
#define REPORT_CREATOR_H_

#include "global.h"

// Qt
#include <QVector>
#include <QString>

class WatchDataPacket;
class ConfigPacket;
class DeviceInfo;
class ProtocolEvent;
class WatchPlot;
class TempPlot;
class RunConfigPlot;
class CrashPlot;

class ReportCreator
{
	DeviceInfo *oDevice;
	WatchDataPacket *oWatchData;
	ConfigPacket *oConfigData;
	WatchPlot *oWatchPlot;
	TempPlot *oTempPlot;
	RunConfigPlot *oRunConfigPlot;
	CrashPlot *oCrashPlot;
	uint oCrashPlotWriteTime;
	int oCrashPlotCode;

	QString oFileName;
	const QVector<ProtocolEvent*> *oEventsPtr;

public:
	ReportCreator();
	~ReportCreator();

	bool create(const QString &fileName, const DeviceInfo *device, const WatchDataPacket *watchData, const ConfigPacket *configData,
			const EventList *events, const WatchPlot *watchPlot, const TempPlot *tempPlot, const RunConfigPlot* runConfigPlot, const CrashPlot *crashPlot,
			uint crashPlotWriteTime, int crashPlotCode);

private:
	void release();

};

#endif /* REPORT_CREATOR_H_ */
